var https = require("https");
var qs = require("querystring");

const param = qs.stringify({
  grant_type: "client_credentials",
  client_id: "zWGk7oca9SyfSP3wTLfZvoID",
  client_secret: "GjYuWiZ3CEuxhWMVGw2dv2s8Stn9xZKR",
});

https.get(
  {
    hostname: "aip.baidubce.com",
    path: "/oauth/2.0/token?" + param,
    agent: false,
  },
  function (res) {
    // 在标准输出中查看运行结果
    res.pipe(process.stdout);
  }
);
